/**
 * desc: 教师接口
 */

import request from '@/static/uitls/request.js'

// 教师详情
const getTeacherDetail = (id) => {
	return request({
		url: '/api/v1/teacher/read?teacher_course_id='+id,
		method: 'GET'
	})
}
// 授课形式
const getClasses = (id) => {
	return request({
		url: '/api/v1/course/classes',
		method: 'GET'
	})
}

// 教学经历
const getExperience = (id) => {
	return request({
		url: '/api/v1/teacher/experience?teacher_id='+id,
		method: 'GET'
	})
}

// 课程评论列表
const getCourseComment = (id,page,size) => {
	return request({
		url: '/api/v1/course_comment?teacher_course_id='+id+'&page='+page+'&size='+size,
		method: 'GET'
	})
}

// 教师忙碌时间
const getTeacherBusyTime = (course_id,date) => {
	return request({
		url: '/api/v1/teacher/busy?teacher_course_id='+course_id+'&date='+date,
		method: 'GET'
	})
}

// 收藏
const isCollect = (id,date) => {
	return request({
		url: '/api/v1/teacher/collect?teacher_course_id='+id,
		method: 'GET'
	})
}
module.exports = {
	getTeacherDetail,
	getClasses,
	getExperience,
	getCourseComment,
	getTeacherBusyTime,
	isCollect
}
